{% extends "base.html" %} {% block content %}

Quiz Results: {{ attempt.quiz.title }}

Your Score: {{ attempt.score }} / {{ attempt.max_score }}

{% if attempt.max_score %}

Percentage: {{ attempt.score|floatformat:2 }} / {{ attempt.max_score }} = {{ attempt.score|divisibleby:attempt.max_score|floatformat:2 }}%

{% endif %}

Started: {{ attempt.started_at|date:"M d, Y H:i" }}

Finished: {{ attempt.finished_at|date:"M d, Y H:i" }}


{% for answer in attempt.answers.all %}
Q{{ forloop.counter }}. {{ answer.question.text }}
    {% for choice in answer.question.choices.all %}
  • {{ choice.text }} {% if choice.id == answer.choice.id %} Your Answer {% elif choice.is_correct %} Correct {% endif %}
  • {% endfor %}
{% if not answer.is_correct %}

Explanation: {{ answer.question.explanation }}

{% endif %}
{% endfor %}
← Back to History
{% endblock %}